//
//  NearActivityProcessCell.m
//  Shengzhuli
//
//  Created by FXGuo on 2017/7/20.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "NearActivityProcessCell.h"
#import "AddressField.h"

@interface NearActivityProcessCell ()<UITextViewDelegate>

@property (weak, nonatomic) IBOutlet AddressField *processField;

@end

@implementation NearActivityProcessCell

- (void)awakeFromNib {
    [super awakeFromNib];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        self.processField.placeHolder = @"请描述活动流程";
    });
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textChanged:) name:UITextViewTextDidChangeNotification object:nil];
}

- (void)textChanged:(NSNotification *)noti
{
    AddressField *textView = noti.object;
    if (textView.tag == 1) {
        self.model.flow = textView.text;
    }
}

- (void)setModel:(ActivityDetailModel *)model
{
    _model = model;
    self.processField.text = model.flow;
}

@end
